POV-Ray : Newsgroups : povray.general : question : question Server Time
7 Aug 2024 23:20:22 EDT (-0400)
  question  
From: Dennis Milller
Date: 26 Apr 2001 10:54:21
Message: <3ae8369d$1@news.povray.org>
I came across this code and have on question. If the xcounter and zcounter
are identical, why can't they be interchanged in the translate statement?
The image changes dramtically if I substite "zcounter" for "xcounter" or
vice versa, yet the "declare statements seem to do exactly the same thing.
Any clues?
thanks much,
Dennis

camera {
 location <0,3,-3>
 look_at <2,0,3>
}

light_source {
 <100,50,-100>
 color rgb 1
}

#declare r1 = seed(13);
#declare xcounter = 0;
#while (xcounter < 50)
#declare zcounter = 0;
#while (zcounter < 50)
box {<-.25,-.25,-.25>, <.25,.25,.25>

 translate <xcounter,rand(r1),zcounter>   // rand(r1)
 pigment { color rgb <1,1,1> } finish {metallic}}

#declare zcounter = zcounter + 1;
#end
#declare xcounter = xcounter + 1;
#end
--
dhm### [at] mediaonenet
www.casdn.neu.edu/~dmiller


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.